import request from '@/utils/request'

/**
 *  @param workshop
 * 'packaging' | 包装
 * 'cutting' | 开料
 * 'drill' | 钻孔
 * 'plating' | 电镀
 * 'line' | 线路
 * 'lineDetection' | 线路检测
 * 'solderMask' | 防焊
 * 'characters' | 文字
 * 'forming' | 成型
 * 'electricalMeasurement' | 电测
 * 'finalInspection' | 终检
 * 'spray' | 喷锡
 * 'huajin' | 化金
 * 'assay' | 药水化验
 * @return
 */

// 车间实时达成率
export function getRealTimeRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/realTimeAchievementRate`,
    method: 'get',
    params
  })
}

// 车间近十天达成率
export function getTenDaysRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/tenDaysAchievementRate`,
    method: 'get',
    params
  })
}

// 车间按时间类型达成率
export function getRateByTime(workshop, params) {
  return request({
    url: `/screen/${workshop}/achievementRateGroupByTimeType`,
    method: 'get',
    params
  })
}

// 车间水耗
export function getWaterConsume(workshop, params) {
  return request({
    url: `/screen/${workshop}/waterUnitConsume`,
    method: 'get',
    params
  })
}

// 车间电耗
export function getElectricityConsume(workshop, params) {
  return request({
    url: `/screen/${workshop}/electricityUnitConsume`,
    method: 'get',
    params
  })
}

// 车间排产计划
export function getScheduleInfo(workshop, params) {
  return request({
    url: `/screen/${workshop}/productionSchedule`,
    method: 'get',
    params
  })
}

// 车间周转率
export function getTurnoverRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/turnoverRate`,
    method: 'get',
    params
  })
}

// 车间按时间类型周转率
export function getTurnoverRateByTime(workshop, params) {
  return request({
    url: `/screen/${workshop}/turnoverRateGroupByTimeType`,
    method: 'get',
    params
  })
}

// 车间合格率
export function getPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/passRate`,
    method: 'get',
    params
  })
}

// 车间不良统计
export function getBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/badStatistics`,
    method: 'get',
    params
  })
}

// 车间报废率
export function getScrapPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/scrapPassRate`,
    method: 'get',
    params
  })
}

// 车间报废统计
export function getScrapStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/scrapStatistics`,
    method: 'get',
    params
  })
}

// 车间合格率趋势
export function getPassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/passRateTrend`,
    method: 'get',
    params
  })
}

// 车间合格率记录
export function getPassRateRecord(workshop, params) {
  return request({
    url: `/screen/${workshop}/passRateRecord`,
    method: 'get',
    params
  })
}

// 车间稼动率（钻孔）
export function getUtilizationRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/utilizationRate`,
    method: 'get',
    params
  })
}

// 车间曝光合格率（防焊）
export function getExposurePassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/exposurePassRate`,
    method: 'get',
    params
  })
}

// 车间曝光不良统计（防焊）
export function getExposureBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/exposureBadStatistics`,
    method: 'get',
    params
  })
}

// 车间曝光合格率趋势（防焊）
export function getExposurePassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/PCS_PassRateTrend`,
    method: 'get',
    params
  })
}

// 车间首件合格率（文字, 成型，喷锡，化金）
export function getFirstArticlePassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/firstArticlePassRate`,
    method: 'get',
    params
  })
}

// 车间合格率（成型）
export function getVerifyPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/verifyPassRate`,
    method: 'get',
    params
  })
}

// 车间合格率（成型）
export function getVerifyBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/verifyBadStatistics`,
    method: 'get',
    params
  })
}

// 车间合格率趋势（成型）
export function getVerifyPassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/verifyPassRateTrend`,
    method: 'get',
    params
  })
}

// 车间合格率（电测，终检）
export function getInspectionPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/inspectionPassRate`,
    method: 'get',
    params
  })
}

// 车间不良统计（电测，终检）
export function getInspectionBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/inspectionBadStatistics`,
    method: 'get',
    params
  })
}

// 车间合格率趋势（电测，终检）
export function getInspectionPassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/inspectionPassRateTrend`,
    method: 'get',
    params
  })
}

// 车间报废率（电镀）
export function getScrapRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/scrapRate`,
    method: 'get',
    params
  })
}

// 车间曝光合格率（线路）
export function getLineExposurePassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/lineExposurePassRate`,
    method: 'get',
    params
  })
}

// 车间曝光不良统计（线路）
export function getLineExposureBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/lineExposureBadStatistics`,
    method: 'get',
    params
  })
}

// 车间首件合格率（线路）
export function getLineEtchingFirstPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/etchingFirstArticlePassRate`,
    method: 'get',
    params
  })
}

// 车间首件不良统计（线路）
export function getLineEtchingFirstBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/etchingFirstArticleBadStatistics`,
    method: 'get',
    params
  })
}

// 车间合格率趋势（线路）
export function getLineExposurePassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/lineExposurePassRateTrend`,
    method: 'get',
    params
  })
}

// 车间首件合格率趋势（线路）
export function getLineEtchingFirstPassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/etchingFirstArticlePassRateTrend`,
    method: 'get',
    params
  })
}

// 车间报废率趋势（线路检测）
export function getScrapRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/scrapRateTrend`,
    method: 'get',
    params
  })
}

// 车间近12个月合格率趋势（喷锡，化金）
export function getTwelveMonthsPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/twelveMonthsPassRate`,
    method: 'get',
    params
  })
}

// 车间首件合格率趋势（喷锡，化金）
export function getFirstPassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/firstArticlePassRateTrend`,
    method: 'get',
    params
  })
}

// 膜厚趋势图（药水化验）
export function getThicknessTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/thicknessTrend`,
    method: 'get',
    params
  })
}

// UC2+趋势图（药水化验）
export function getUC2Trend(workshop, params) {
  return request({
    url: `/screen/${workshop}/UC2Trend`,
    method: 'get',
    params
  })
}

// 药水化验合格率趋势图（药水化验）
export function getProportionTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/proportionTrend`,
    method: 'get',
    params
  })
}

// 药水化验除胶率趋势图（药水化验）
export function getGelRemovalRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/gelRemovalRateTrend`,
    method: 'get',
    params
  })
}

// 微蚀速率趋势图（药水化验）
export function getCorrosionRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/microCorrosionRateTrend`,
    method: 'get',
    params
  })
}

// 沉积速率趋势图（药水化验）
export function getDepositionRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/depositionRateTrend`,
    method: 'get',
    params
  })
}

// 车间一次检查合格率（药水化验）
export function getFirstInspectionPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/firstInspectionPassRateTrend`,
    method: 'get',
    params
  })
}

// 车间二次检查合格率（药水化验）
export function getSecondaryInspectionPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/secondaryInspectionPassRateTrend`,
    method: 'get',
    params
  })
}

// 车间OSP（药水化验）
export function getOSP_Rate(workshop, params) {
  return request({
    url: `/screen/${workshop}/OSP_Rate`,
    method: 'get',
    params
  })
}

// 车间蚀刻药水（药水化验）
export function getEtchingSolutionRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/etchingSolutionRate`,
    method: 'get',
    params
  })
}

// 车间线路显影（药水化验）
export function getLineRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/lineDevelopmentRate`,
    method: 'get',
    params
  })
}

// 车间防焊显影（药水化验）
export function getSolderMaskRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/solderMaskDevelopmentRate`,
    method: 'get',
    params
  })
}

// 车间成品清洗线（药水化验）
export function getCleaningLineRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/cleaningLineRate`,
    method: 'get',
    params
  })
}

// 车间线路前处理（药水化验）
export function getLinePreProcessingRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/linePreProcessingRate`,
    method: 'get',
    params
  })
}

// 车间防焊前处理（药水化验）
export function getSolderMaskPreProcessingRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/solderMaskPreProcessingRate`,
    method: 'get',
    params
  })
}

// 车间PTH（药水化验）
export function getPTH_Rate(workshop, params) {
  return request({
    url: `/screen/${workshop}/PTH_Rate`,
    method: 'get',
    params
  })
}

// 车间PTH二次检查合格率（药水化验）
export function getPTH_SecondaryRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/PTH_SecondaryRate`,
    method: 'get',
    params
  })
}

// 车间镀铜（药水化验）
export function getPlatingRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/platingRate`,
    method: 'get',
    params
  })
}

// 车间物料种类抽检（物料品质）
export function getMaterialTypeSampling(workshop, params) {
  return request({
    url: `/screen/${workshop}/materialTypeSampling`,
    method: 'get',
    params
  })
}

// 车间抽检合格率（终检）
export function getSamplingPassRate(workshop, params) {
  return request({
    url: `/screen/${workshop}/samplingPassRate`,
    method: 'get',
    params
  })
}

// 车间抽检不良统计（终检，物料品质）
export function getSamplingBadStatistics(workshop, params) {
  return request({
    url: `/screen/${workshop}/samplingBadStatistics`,
    method: 'get',
    params
  })
}

// 车间物料合格率趋势（终检，物料品质）
export function getSamplingPassRateTrend(workshop, params) {
  return request({
    url: `/screen/${workshop}/samplingPassRateTrend`,
    method: 'get',
    params
  })
}

// 检测车间是否启用虚拟数据
export function getVirtualTurn(params) {
  return request({
    url: `/screen/home/showVirtualData`,
    method: 'get',
    params
  })
}
// 获取车间虚拟数据（图片）
export function getVirtualDataById(params) {
  return request({
    url: `/screen/weVirtualData/getWorkshopById`,
    method: 'get',
    params
  })
}